package com.quanyan.ic.parkingLot.http.dao;

import com.quanyan.ic.parkingLot.http.dao.sqlProvider.TestSqlProvider;
import com.quanyan.ic.parkingLot.http.entity.TbTest;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.SelectProvider;

/**
 * Created by zhang on 17/8/21.
 */
@Mapper
public interface TestMapper {
    @SelectProvider(type = TestSqlProvider.class, method = "queryTestById")
    TbTest queryTestById(Integer id);

    @InsertProvider(type = TestSqlProvider.class, method = "insertTest")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    int insertTest(TbTest test);
}
